﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.SessionState;
using Newtonsoft.Json;
using BaseFunction;

namespace YY.Web.MyAgent.financial_information
{
    /// <summary>
    /// PriceHandler 的摘要说明
    /// </summary>
    public class PriceHandler :LoginHelp,IHttpHandler,IHttpSessionState
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            var action = BaseFunction.RequestValidate.GetQueryString("action","");
            
            switch (action)
            {
                case "price":
                    var getJson = BaseFunction.StaticTableClass.SystemConfigHelp.GetSystemConfigValue("smsprice");
                    context.Response.Write(getJson);
                    break;
                case "PayPwd":
                    string PayPwd = RequestValidate.GetFormString("value", "");
                    int uid = RequestValidate.GetFormInt("uid", 0);
                    //context.Response.Write(IsExistPayPwd(PayPwd, uid));
                    break;
            }
            
        }
        ///// <summary>
        ///// 判断支付密码是否正确
        ///// </summary>
        ///// <param name="PayPwd"></param>
        ///// <returns></returns>
        //private string IsExistPayPwd(string PayPwd, int uid)
        //{
        //    //加密参数
        //    var _model = new BaseFunction.StaticTableClass.agent_users_Help().GetModel_Agent_Id(uid, PayPwd, true);

        //    if (_model==null)
        //    {
        //        return "0";
        //    }
        //    else
        //    {
        //        return "1";
        //    }
        //}
        public bool IsReusable
        {
            get
            {
                return false;
            }
        }

        public void Abandon()
        {
            throw new NotImplementedException();
        }

        public void Add(string name, object value)
        {
            throw new NotImplementedException();
        }

        public void Clear()
        {
            throw new NotImplementedException();
        }

        public HttpCookieMode CookieMode
        {
            get { throw new NotImplementedException(); }
        }

        public void CopyTo(Array array, int index)
        {
            throw new NotImplementedException();
        }

        public int Count
        {
            get { throw new NotImplementedException(); }
        }

        public System.Collections.IEnumerator GetEnumerator()
        {
            throw new NotImplementedException();
        }

        public bool IsCookieless
        {
            get { throw new NotImplementedException(); }
        }

        public bool IsNewSession
        {
            get { throw new NotImplementedException(); }
        }

        public bool IsReadOnly
        {
            get { throw new NotImplementedException(); }
        }

        public bool IsSynchronized
        {
            get { throw new NotImplementedException(); }
        }

        public System.Collections.Specialized.NameObjectCollectionBase.KeysCollection Keys
        {
            get { throw new NotImplementedException(); }
        }

        public SessionStateMode Mode
        {
            get { throw new NotImplementedException(); }
        }

        public void Remove(string name)
        {
            throw new NotImplementedException();
        }

        public void RemoveAll()
        {
            throw new NotImplementedException();
        }

        public void RemoveAt(int index)
        {
            throw new NotImplementedException();
        }

        public string SessionID
        {
            get { throw new NotImplementedException(); }
        }

        public HttpStaticObjectsCollection StaticObjects
        {
            get { throw new NotImplementedException(); }
        }

        public object SyncRoot
        {
            get { throw new NotImplementedException(); }
        }

        public int Timeout
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public object this[int index]
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public object this[string name]
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }
    }
}